package com.boco.eoms.report.controler;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.boco.eoms.report.common.ReportsBO;

public class ReportServlet extends HttpServlet {
	public void init(ServletConfig config) throws ServletException {
		String path = config.getServletContext().getRealPath("/");
		initQuzrtz(path);
	}

	private void initQuzrtz(String _realPath) {
		// TODO Auto-generated method stub
		System.out.println("init Quartz Start!");
		ReportsBO report=ReportsBO.getInstance();
		report.init(_realPath);
		ApplicationContext ctx = new ClassPathXmlApplicationContext(
				"classpath:config/JobQuartz.xml");
		System.out.println("init Quartz end!");
	}


}
